#include"head.h"

//本地实现recv(netfd,buf,len,MSG_WAITALL)
int recvn(int netfd,char*buf,int length)
{
    int ret;

    char *p=buf;
    int i=0;

    while(i<length)
    {
        printf("other.c:recved file name\n");
        ret= recv(netfd,p+i,length-i,0);
        if(ret ==0)
            break;
        i +=ret;
    }
    printf("other.c:recv_done\n");
    return i;
}
